package model

import "time"

type User struct {
	Id        int64     `gorm:"column:id;type:bigint;primaryKey;not null;" json:"id"`
	Mobile    string    `gorm:"column:mobile;type:varchar(255);comment:账号;default:NULL;" json:"mobile"`     // 账号
	Password  string    `gorm:"column:password;type:varchar(255);comment:密码;default:NULL;" json:"password"` // 密码
	CreatedAt time.Time `gorm:"column:created_at;type:datetime(3);default:CURRENT_TIMESTAMP(3);" json:"created_at"`
	UpdatedAt time.Time `gorm:"column:updated_at;type:datetime(3);default:CURRENT_TIMESTAMP(3);" json:"updated_at"`
	DeletedAt time.Time `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
}

func (u *User) TableName() string {
	return "user"
}
